package com.itheima.charstream;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.charset.Charset;

/*
创建对象时 直接 指定编码集
 */
public class Demo07 {

    public static void main(String[] args) throws IOException {

        FileReader reader = new FileReader("day13\\b.txt",Charset.forName("gbk"));
        int c;

        while((c=reader.read())!=-1){
            System.out.println((char)c);
        }
        reader.close();
    }


}
